Repository navigation
feat(pool): the share switch runs the node agent, on Windows in WSL2 (ADR-0113) - #580
Merged
Merged
Conversation
…(ADR-0113) The hub runs a node agent for each pool whose switch is on: on Linux inside the hub, on Windows in a WSL2 distribution with a copy of the machine's membership (one member per machine). It checks the distribution and shows what is missing with commands and a setup prompt, never changing it itself. Off while others' lanes run, the agent takes no new lanes (--no-new-lanes) and ends with the last. The node reports `sharing` from its settings. Closes #171. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The share switch is back and makes the machine a node: on Linux the hub runs the node agent itself, on Windows it runs it in a WSL2 distribution with a copy of the machine's membership. Builds on the WSL2 spike of #168 (result in #168). Closes #171.
Review card
Approved by the owner in the conversation on 2026-11-18, points 1 to 5.
wsl.exe -d <distro> -u root -- devstack node agent …), starts it again when it ends, and ends it when switched off.wsl --shutdownstay with the user..wslconfiggives WSL; never--dedicated.Decided while building (in ADR-0113): the prompt is copied from the switch, not handed to an agent the hub starts; point 4 holds by construction (the agent measures inside the VM); the switch's agent takes no admin-ordered update (
on_update: None); one switch and port per pool (default 4261); macOS says "not yet"; the switch lives innode-host.json, so an oldshare.jsonwithenableddoes not start an agent.Changes
crates/devstack-hub/src/nodehost.rs(new): the switch, the supervisor (decide: start, restart, drain, stop), Linux in-process agent, Windows: distribution list, checks, membership copy into/var/lib/devstack-node/<pool>, agent viawsl.exe, setup prompt.share.rs:GETcarriesswitchandhost,PUTsaves and acts; no hub report while its agent runs.devstack node agent --membership <dir> --no-new-lanes; the node's report sayssharingfrom its settings.ShareSwitch.vuein the sidebar and Pool → This machine (distribution, caps, state, checks with copyable commands, prompt, last lines).Tests
share.json, the WSL list in UTF-16, the distribution's checks and prompt, the address toward the coordinator.GET/PUT /hub/pool/sharewithout a membership.ShareSwitch.test.ts(checks, draining, waiting for a grant, the switch sent with the distribution); typecheck, 287 tests.cargo clippy --workspace --all-targets,cargo test --workspacegreen on Windows. The Linux in-process path is compiled by CI only (no cross compiler here).🤖 Generated with Claude Code